home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 009a / spp.exe / BREAK.H < prev    next >
C/C++ Source or Header  |  1991-02-07  |  2KB  |  54 lines

  1. #ifndef _BREAK_H
  2. #define _BREAK_H
  3. //============================================================================
  4. //
  5. //  BREAK.H
  6. //
  7. //  Source include file for class BreakTrap
  8. //  Serial++ Library SPP.LIB Ver. 1.0
  9. //
  10. //  Copyright (c) 1991 Cortlandt Technologies, All rights reserved.
  11. //
  12. //     Cortlandt Technologies, P.O. Box 195, Pleasantville NY 10570
  13. //
  14. //  Please direct all inquiries to the above address,
  15. //  or via Compuserve: 71066,155
  16. //
  17. //============================================================================
  18.  
  19.     struct BreakAnchor;
  20.  
  21.     class BreakTrap
  22.         {
  23.         private:
  24.          BreakAnchor     *ba;
  25.  
  26.             static void capture(void);
  27.          static void release(void);
  28.  
  29.         public:
  30.  
  31.             BreakTrap(void);                  // first occurence sets trap
  32.                                            // subsequent one point
  33.  
  34.             ~BreakTrap(void);                 // deletes instance
  35.                                            // if owner, releases trap
  36.  
  37.             void reset(void);                 // clear flag
  38.  
  39.             int isBreak(void);                // true when flag set
  40.  
  41.             unsigned int breakCt(void);       // counts accumulated hits
  42.  
  43.             int isCaptured(void);             // true if trap set
  44.  
  45.             int isOwner(void);                // true if this instance
  46.                                                          // is owner of trap
  47.  
  48.             int operator()(void);             // true if trap is set and
  49.                                            // flag is true;
  50.                                            // resets flag
  51.         };
  52.  
  53. #endif
  54.